#include<stdio.h>
#include<string.h>

int main()
{
	FILE *fp=fopen("log.txt","w");
	if(fp==NULL)
	{
		perror("fopen");
	}

	const char* msg = "hello bit";
	int cnt =1;
	while(cnt<=10)
	{
		char buffer[1024];
		snprintf(buffer,sizeof(buffer),"%s%d",msg,cnt++);

		fwrite(buffer,strlen(buffer),1,fp);
	}

	fclose(fp);
	return 0;
}
